package com.mall.ibatis.bean;

import java.io.Serializable;

import com.thoughtworks.xstream.XStream;

@SuppressWarnings("serial")
public class ReturnMessage implements Serializable
{
	public final static String SUCCESS = "1";
	public final static String FAIL = "0";
	public final static String UNKNOW = "-1";
	
	private String flag;
	private String body;
	
	public ReturnMessage()
	{
		
	}
	
	public ReturnMessage(String flag)
	{
		this.flag = flag;
	}
	
	public ReturnMessage(String flag,String body)
	{
		this.flag = flag;
		this.body = body;
	}
	
	
	public String getFlag()
	{
		return flag;
	}
	public void setFlag(String flag)
	{
		this.flag = flag;
	}
	public String getBody()
	{
		return body;
	}
	public void setBody(String body)
	{
		this.body = body;
	}
	
	public String toXMLString()
	{
		XStream xStream = new XStream();
		
		xStream.alias("returnMessage", ReturnMessage.class);
		
		return xStream.toXML(this);
	}
	
	

}
